<?php foreach($languages as $lang) {
    if($lang->code!=$currentLang){
        echo CHtml::link(
            '<img src="'.Yii::app()->request->baseUrl.'/images/flags/'.$lang->image.'" title="'.$lang->name.'" style="padding: 1px;" width=16 height=11>',
            $this->createMultilanguageReturnUrl($lang->code),array(
                //'class'=>'onlinequestion',
            )
        );
    }
} ?>